package Presentation;


import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JPanel;

import solitaire.application.Solitaire;
import solitaire.application.Usine;
import Controlor.CSolitaire;

public class PSolitaire extends JFrame{
	
	private static final long serialVersionUID = 1L;

	public PSolitaire(String name, Solitaire controller, Usine factory, PSabot psabot, PColonne[] pcolonneAlternees, PTasDeCarteColoree[] pcolonneColoree) {
		super("Solitaire");
		setLayout(new BorderLayout());	
		
		this.setSize(new Dimension(800, 600));
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		JPanel mainPanel = new JPanel();
		
		//sabot
		mainPanel.add(psabot);
		psabot.setBounds(0, 0, 250, 120);		
		
		//7 colonneAlternees
		for(int i = 0; i<pcolonneAlternees.length; i++) {				
			pcolonneAlternees[i].setBounds(20*(i+1)+i*PCarte.largeur, 130, PCarte.largeur + 4, 400);
			mainPanel.add(pcolonneAlternees[i],0);
		}
		
		//4 colonnesDeHaut
		
		this.setVisible(true);
	}
	
	//test
	public static void main(String []args){
		
	}
	
}
